package com.exhr.dao.impl;

import com.exhr.dao.AccountDao;
import com.exhr.pojo.Taccount;

public class AccountDaoImpl extends BaseDaoImpl<Taccount> implements AccountDao{
	
	public AccountDaoImpl() {
		super(Taccount.class);
	}
	
	public Taccount login(Taccount acc){
		Taccount account=(Taccount) queryObject("from Taccount ac where ac.accname=?", new Object[]{acc.getAccname()});
		if(account!=null){
			if(account.getAccname()!=null&&account.getAccpwd()!=null
					&&account.getAccpwd().equals(acc.getAccpwd())){
				return account;
			}
		}
		return null;
	}
}
